package com.angis.fx.activity.sxry;

import android.app.ActivityGroup;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;

import com.angis.fx.activity.R;

public class SxryTabs extends ActivityGroup {
	public static TabHost tab_host;
	Bundle bundle;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.bottomtab);
		if(bundle==null)
		 bundle=this.getIntent().getExtras();
		//ContextInfo contextInfo=(ContextInfo) bundle.get("contextInfo");
		
		tab_host = (TabHost) findViewById(R.id.changsuodetailstab);
		tab_host.setup(this.getLocalActivityManager());

		TabSpec ts1 = tab_host.newTabSpec("details");
		ts1.setIndicator("人员列表");
		
		Intent mIntent=new Intent(this, SxryMActivity.class);
		mIntent.putExtras(bundle);
		ts1.setContent(mIntent);
		tab_host.addTab(ts1);
		
		TabSpec ts2 = tab_host.newTabSpec("postion");
		ts2.setIndicator("随行人员");
		
		Intent sIntent=new Intent(this, SxryActivity.class);
		sIntent.putExtras(bundle);
		ts2.setContent(sIntent);
		tab_host.addTab(ts2);

//		TabSpec ts3 = tab_host.newTabSpec("picture");
//		ts3.setIndicator("照片");
//		ts3.setContent(new Intent(this, ChangsuoPictureActivity.class));
//		tab_host.addTab(ts3);

		tab_host.getTabWidget().getChildAt(0).getLayoutParams().height = 40;
		tab_host.getTabWidget().getChildAt(1).getLayoutParams().height = 40;
		//tab_host.getTabWidget().getChildAt(2).getLayoutParams().height = 40;

		tab_host.setCurrentTab(0);
	}
}
